package com.huluobo.a2202mvvm_im_douyindemo.register;

import androidx.lifecycle.MutableLiveData;

import com.huluobo.a2202mvvm_im_douyindemo.login.LoginUserBean;
import com.huluobo.a2202mvvm_im_douyindemo.mvvmBase.BaseViewModel;
import com.huluobo.a2202mvvm_im_douyindemo.register.RegisterRepo;

/**
 * Created by LC on 2024/4/20.
 */
public class RegisterViewModel extends BaseViewModel<RegisterRepo> {

    MutableLiveData<LoginUserBean> success = new MutableLiveData<>();

    MutableLiveData<Integer> failed = new MutableLiveData<>();

    public void register(String username, String password) {
        repo.register(username, password, success, failed);
    }

    @Override
    protected RegisterRepo createRepo() {
        return new RegisterRepo();
    }
}
